home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{2179C5D0-EBFF-11CF-B6FD-00AA00B4E220}#1.0#0"; "NSPLAY.OCX"
- Begin VB.Form menu
- Caption = "Helper - Developed By Nikki"
- ClientHeight = 3840
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4920
- LinkTopic = "Form1"
- ScaleHeight = 3840
- ScaleWidth = 4920
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton asfnetp
- Caption = "Code to play asf network file"
- Height = 645
- Left = 810
- TabIndex = 5
- Top = 2850
- Width = 2745
- End
- Begin NSPlayCtl.NSPlay NSPlay1
- Height = 825
- Left = 3990
- TabIndex = 4
- Top = 420
- Width = 495
- _ExtentX = 873
- _ExtentY = 1455
- End
- Begin VB.CommandButton asfpl
- Caption = "Code to play Asf Local file"
- Height = 615
- Left = 810
- TabIndex = 3
- Top = 2220
- Width = 2685
- End
- Begin VB.CommandButton freesz
- Caption = "Code for getting Free space on disk"
- Height = 585
- Left = 810
- TabIndex = 2
- Top = 1620
- Width = 2655
- End
- Begin VB.CommandButton compnm
- Caption = "Code to get Computer Name"
- Height = 585
- Left = 810
- TabIndex = 1
- Top = 1035
- Width = 2655
- End
- Begin VB.CommandButton sndplay
- Caption = "Code to play wav sound"
- Height = 585
- Left = 810
- TabIndex = 0
- Top = 450
- Width = 2655
- End
- Attribute VB_Name = "menu"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim sBuf As String
- Dim cSize As Long
- Dim retval As Long
- Private Sub asfnetp_Click()
- ''goto be online for this
- NSPlay1.AutoRewind = True
- NSPlay1.FileName = "c:\netshow\asfroot\sample.asf"
- NSPlay1.FileName = "http://msnetshow.microsoft.com/vdo/johnk.asf"
- End Sub
- Private Sub asfpl_Click()
- ''first of all to play asf you must have netshow installed on your computer
- ''use the nsplay.ocx and drag the control on your form, it is invisible at runtime
- ''the file name was the entire path where the file is located, alternatively
- ''you could use a dir list and file list box to get user input
- NSPlay1.AutoRewind = True
- NSPlay1.FileName = "c:\netshow\asfroot\sample.asf"
- NSPlay1.Play
- ''check out all other properties of the nsfplayer
- End Sub
- ''all functions have been declared in the .bas file
- Private Sub freesz_Click()
- Dim secpercl, bypersec, numfreesec, totcl As Long
- Dim fullfreesz As Long
- retval = GetDiskFreeSpace("C:\", secpercl, bypersec, numfreesec, totcl)
- fullfreesz = secpercl * bypersec * numfreesec
- Dim mbsize As Long
- mbsize = Int(fullfreesz) / 1048576
- MsgBox "On Drive C:" & Chr(10) & "Free Size in Bytes is " & fullfreesz & Chr(10) & "Free Size in MB is" & mbsize
- End Sub
- Private Sub sndplay_Click()
- Dim Windir As String
- Dim N As Integer
- 'Create a variable large enough to store the Windows path.
- sBuf = String(255, 0)
- cSize = 255 'Get Windows Directory
- retval = GetWindowsDirectoryA(sBuf, cSize)
- 'Strip buffer from Windows directory
- Windir = Left(sBuf, retval)
- 'Load and Play the sound.
- ''if tada.wav doesnot exist on your system please give path for any other wav file
- ''you can also accept userinput for file location by using dirlist and filelist controls
- N = sndPlaySound(Windir + "\Media\Tada.wav ", 0)
- End Sub
- Private Sub compnm_Click()
- 'Create a variable large enough to store the Computer Name
- sBuf = String(255, 0)
- cSize = 255
- retval = GetComputerName(sBuf, cSize)
- 'Strip buffer from Computer Name
- MsgBox sBuf
- End Sub
-